#  Author : wyq

def fib(max):
    n,a,b = 0,0,1
    while n < max:
        # print(b)
        yield b
        # t = (b,a+b)
        # a = t[0] b = t[1]
        a, b = b ,a+b
        n = n+1
#    return 'done'

f = fib(10)
# 这个F函数可以中断
print(f.__next__())
print('====')
print(f.__next__())

print("start loop")
for i in f :
    print(i)